//
//  StatusCell.h
//  friendCyc
//
//  Created by roiland on 13-3-26.
//  Copyright (c) 2013年 sun. All rights reserved.
//

#import "EGOImageButton.h"
#import "FriendStatus.h"

#import <AVFoundation/AVFoundation.h>

#define STATUSCELL_HEAD_HIGH    50
#define STATUSCELL_INTERVAL     6
#define STATUSCELL_SOUNDBTN_W   44
#define ARR_IMAGE_WIDTH         80
#define ARR_IMAGE_INTERVAL      4
#define ARR_IMAGE_START         20

@protocol StatusCellDelegate;
@class AVAudioPlayer;

@interface StatusCell : UITableViewCell<AVAudioPlayerDelegate>
{
   FriendStatus     *status;
   UILabel          *statusAnchor;//状态发布人
   UILabel          *statusContent;//状态文字
   UIImageView      *headPhoto;//发布人头像
   UILabel          *timeLabel;//显示发布时间
   UILabel          *imgIntrLabel;//显示图片说明信息
   UIButton         *commentsbtn;//评论按钮
   UILabel          *commentsCntLabel;//评论数量
    
   __unsafe_unretained id<StatusCellDelegate> delegate;
    
    AVAudioPlayer           *player;
}

@property (strong, nonatomic) FriendStatus      *status;
@property (strong, nonatomic) UIImageView       *imgPhoto;//显示第一张图片，或者一个语音图标
@property (strong, nonatomic) UILabel           *statusAnchor;
@property (strong, nonatomic) UILabel           *statusContent;
@property (strong, nonatomic) UIImageView       *headPhoto;
@property (strong, nonatomic) UILabel           *timeLabel;
@property (strong, nonatomic) UILabel           *imgIntrLabel;
@property (strong, nonatomic) UIButton          *commentsbtn;
@property (strong, nonatomic) UILabel           *commentsCntLabel;
@property (unsafe_unretained,nonatomic) id<StatusCellDelegate> delegate;
@property (strong, nonatomic) UIImageView       *soundBtn;//声音按健
@property (strong, nonatomic) UIButton          *packupBtn;//收起按钮
@property                     int               irow;
@property                     int               isection;
@property (strong, nonatomic) NSMutableArray    *imageArr;//显示图片数组

- (void)resizeTheHeight;
- (void)reloadCell;

@end

@protocol StatusCellDelegate<NSObject>
@optional
- (void)imageButtonClicked:(int)btnTag;
-(void)ImageArrBtnClicked:(int)btnTag withImageTag:(int)imageTag;
@end

